﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using KvoMvc.BusinessComponent;

namespace KvoMvc.Service.Console
{
    class Program
    {
        private static ServiceHost shSchoolManager;
        private static ServiceHost shSecurityManager;
        static void Main(string[] args)
        {
            try
            {
                System.Console.WriteLine("Starting WCF Service");
                shSchoolManager = new ServiceHost(typeof(SchoolManager));
                shSecurityManager = new ServiceHost(typeof(SecurityManager));
                shSchoolManager.Open();
                shSecurityManager.Open(); 
                System.Console.WriteLine("Opening SchoolManager WCF Service");
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex.Message);
            }
            System.Console.ReadLine();
            shSchoolManager.Close();
            shSecurityManager.Close();
        }
    }
}
